package com.jzcn.common.enums;

import lombok.Getter;

public enum ActionEnum {

    ACTION_LOGIN("登录", 1),

    ACTION_UNLOGIN("退出", 2);


    @Getter
    private String content;

    @Getter
    private Integer value;


    ActionEnum(String content, Integer value) {
        this.content = content;
        this.value = value;
    }

    public static ActionEnum getByValue(Integer value) {
        ActionEnum[] types = ActionEnum.values();
        for (ActionEnum type : types) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }

}
